feat: introduce scan.tag-name option to specify scanning from tag for reading given tag#85
Conversation
a32a8c2 to
62e7e31
Compare
There was a problem hiding this comment.
Pull request overview
Adds support for “time travel” reads from a named tag in batch mode by introducing a new scan.tag-name option and the supporting Tag/TagManager infrastructure.
Changes:
- Add
scan.tag-nameto options, CoreOptions, and scanning startup logic forFROM_SNAPSHOTmode. - Introduce
Tag(snapshot + tag metadata) andTagManagerfor loading tags from storage. - Add a new
StaticFromTagStartingScannerand update relevant tests/CMake wiring.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| test/inte/scan_inte_test.cpp | Updates expected error message when FROM_SNAPSHOT lacks required inputs. |
| src/paimon/core/utils/tag_manager_test.cpp | Adds tests for tag lookup/path generation. |
| src/paimon/core/utils/tag_manager.h | Introduces TagManager API for loading tags. |
| src/paimon/core/utils/tag_manager.cpp | Implements tag lookup and tag path construction. |
| src/paimon/core/utils/snapshot_manager.h | Exposes filesystem/root accessors used by tag-based scanning. |
| src/paimon/core/utils/snapshot_manager.cpp | Implements the new SnapshotManager accessors. |
| src/paimon/core/tag/tag_test.cpp | Adds serialization/deserialization and parsing tests for Tag. |
| src/paimon/core/tag/tag.h | Introduces Tag as an extension of Snapshot with tag fields. |
| src/paimon/core/tag/tag.cpp | Implements Tag JSON (de)serialization and trimming to Snapshot. |
| src/paimon/core/table/source/snapshot/static_from_tag_starting_scanner.h | Adds a starting scanner that reads from a specific tag. |
| src/paimon/core/table/source/abstract_table_scan.h | Wires scan.tag-name into FROM_SNAPSHOT startup logic. |
| src/paimon/core/core_options_test.cpp | Verifies default value for GetScanTagName(). |
| src/paimon/core/core_options.h | Adds CoreOptions::GetScanTagName(). |
| src/paimon/core/core_options.cpp | Parses/stores the new scan.tag-name option. |
| src/paimon/common/defs.cpp | Defines Options::SCAN_TAG_NAME. |
| src/paimon/CMakeLists.txt | Adds new source/test files to the build. |
| include/paimon/defs.h | Documents and declares Options::SCAN_TAG_NAME in the public header. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/paimon/core/table/source/snapshot/static_from_tag_starting_scanner.h
Show resolved
Hide resolved
62e7e31 to
c978877
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/paimon/core/table/source/snapshot/static_from_tag_starting_scanner.h
Show resolved
Hide resolved
c978877 to
98a96d5
Compare
98a96d5 to
fc8ae95
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
63c6005 to
89e18ca
Compare
|
Ping @lucasfang, @lxy-9602. |
22dba36 to
64033b3
Compare
64033b3 to
f390c5e
Compare
f390c5e to
346f039
Compare
1de3a86 to
c48e8f6
Compare
54637b6 to
3dbc9ef
Compare
… reading given tag
3dbc9ef to
f99bda1
Compare
Purpose
Linked issue: close #83
Introduce
scan.tag-name optionto specify scanning from tag for reading given tag.Tests
CoreOptionsTest, TestDefaultValueCoreOptionsTest TestFromMapScanInteTest, TestScanAppendWithInvalidOptionsTagManagerTest, TestGetTagManagerTest, TestTagPathTagTest, TestSimpleTagTest, TestFromPathTagTest, TestJsonizableTagTest, TestSerializeAndDeserializeScanInteTest, TestScanAppendWithTag1ScanInteTest, TestScanInvalidTagAPI and Format
Introduce
scan.tag-name optionoption to specify tag name used in case offrom-snapshotscan mode.Documentation
No.